Table Format

The invoice-print schema has the following structure:

Schema

 

invoice-print schema
type object
properties id type integer
  description Unique identifier for a particular batch
  maximum 15.0
  minimum 1.0
  interfaceCategory type string
  description Identifier that indicates which interface category this batch relates to
  maxLength 50
  interfaceType type string
  description Identifier that indicates which interface type this batch relates to
  maxLength 50
  version type number
  description Version of JSON this batch file was built against
  maximum 999999.99
  minimum 0.0
  batchDateTime type string
  required True
  description Date and time this batch was created
  format date-time
  extractDateTime type string
  required True
  description Date and time the JSON format was created for this batch
  format date-time
  recordCount type integer
  description Number of records within the orginal batch
  languageIdentifier type string
  description Language identifier that is applicable to all the data within this file
  maxLength 6
  isoCurrencyCode type string
  description Currency code that is applicable to all monetary amounts within this file
  maxLength 3
  minLength 1
  voiceUnitMeasure type string
  description Measure that is applicable to all voice usage within this file. Typically, this would be in seconds
  maxLength 10
  dataUnitMeasure type string
  description Measure that is applicable to all data usage within this file. Typically, this would be in kilobytes
  maxLength 10
  callCentreContactNumber type string
  description Call centre contact number that will be printed on all subscription bills, they can contact this number if they have a query relating to their bill
    callCentreContactEmail maxLength 20
  type string
  description Call centre contact email that will be printed on all subscription bills, they can contact this email if they have a query relating to their bill
  maxLength 50
  callCentreWebAddress type string
  description Call centre web address that will be printed on all subscription bills
  maxLength 50
  callCentreOpeningHours type string
  description Call centre opening hours that will be printed on all subscription bills
  maxLength 20
  envelopes type array - see the envelopes array table for details
  description All batches consist of one or more envelopes, which represent distinct billing addresses

 

envelopes array
items type object
  properties billingMedia type object
    description This is the billing media
    properties For details, see the billingMedia properties table.
    isCopy type string
    description indicates this is a copy or an original invoice, statement or detailed bill
    maxLength 1
    minLength 1
    isMarketingExcluded type string
    description indicates if the subscription has opted out of any marketing inserts that would be applied by print bureau when generating the invoice/statement/detailed bill
    maxLength 6
    emailAddress type string
    description email address of the subscription or account that is to receive the invoice/statement/detailed bill
    maxLength 10
    postalAddress type object
      description This is the postal address
      properties For details, see the postalAddress properties table.

 

billingMedia
properties id type string
description Unique identifier for a billing media code. Indicates a subscription preferred method of receiving their invoice. Subscription can opt to receive standard format, large font format, audio, braille or email
maxLength 6
description type string
description Actual name of the billing media
maxLength 30

 

postalAddress
properties   type string
  description Title the subscriber wishes to be referred to as
  maxLength 10
  forename type string
  description First name of a subscription
  maxLength 15
  middleName type string
  description Middle name of a subscription
  maxLength 10
  surname type string
  description Surname of a subscription
  maxLength 25
  companyName type string
  description Actual name of a compnay
  maxLength 30
  postCode type string
  description post code
  maxLength 10
  addressLines type array - see the addressLines array table for details
  description This is the Address Lines
  statements type array - see the statements array table for details
  description This is Statements
  invoices type array- see the invoices array table for details
  description This is Invoices
  detailedBills type array - see the detailedBills array table for details
  description This is Detailed Bills

 

addressLines array
items type object
properties line type string
description Address of a particular subscription. Address line 1 is mandatory, rest are optional
maxLength 40

 

statements array
items type object
  properties statementID type integer
    description Unique Identifier for a statement
    maximum 19.0
    minimum 1.0
    statementDate type string
    required True
    description Date the statement was produced
    format date-time
    forAttentionOfName type string
    description Recipient of the statement
    maxLength 6
    accountNumber type number
    description Only populated where statement production has been consolidated at individual account level
    maximum 8.0
    minimum 1.0
    totalAmountDue type number
    description This is the total of ALL closing balances for accounts that are part of this statement
    maximum 999999.99
    minimum 1.0
    corporate type object
    description Only populated where statement production has been consolidated to a corporate entity
    properties For details, see the corporate properties table.
    group type object
    description Only populated where statement production has been consolidated to a group
    properties For details, see the group properties table.
    accounts type array - see the accounts array for statements table for details
    description This is Accounts.

 

corporate
properties id type string
description Unique identifier for a corporate, this represents the corporate structure that a subscription is associated with
maxLength 6
minLength 1
description type string
description Actual name of a corporate
maxLength 30

 

group
properties id type string
description Unique identifier for a group, this represents the group structure that a subscription is associated with
maxLength 6
description type string
description Actual name of the group
maxLength 30
minLength 1

 

accounts array for statements
items type object
  properties accountID type integer
    description Unique account number identifier
    maximum 8.0
    minimum 1.0
    previousClosingBalance type number
    description Monetary amount representing the previous closing balance on the account
    maximum 999999.99
    minimum 0.0
    openingBalance type number
    description Monetary amount comprising of previous closing balance minus any open query amounts plus or minus transactions since last statement period
    maximum 999999.99
    minimum 0.0
    closingBalance type number
    description Monetary amount composed of the open balance plus any charges this period
    maximum 999999.99
    minimum 0.0
    queryAmount type number
    description Monetary amount comprising any amounts that are in dispute from a subscription point of view
    maximum 999999.99
    minimum 0.0
    isPosting type boolean
    description Indicates whether the account is a posting account or not
    corporate type object
      description Only populated if account is part of a corporate structure
      properties For details, see the corporate properties table.
    totalPayments type number
    description Monetary total of gross amounts for all the payments on this account for this period
    maximum 11.0
    minimum 1.0
    totalAdjustments type number
    description Monetary total of gross amounts for all the adjustments on this account for this period
    maximum 11.0
    minimum 1.0
    payments type array - see the payments array table for details
    description This is Payments
   

adjustments

type array - see the adjustments array table for details
    description This is Adjustments

 

adjustments array
items type object
  properties date type string
    description Represents the date on which the adjustment was made
    description type string
    description Short description outlining the nature of the adjustment
    maxLength 30
    grossAmount type number
    description Monetary amount of the adjustment including the tax
    maximum 1e+11
    minimum 0.0
    documentType type object
      description This is the document type
      properties For details, see the documentType properties table.
    documentNumber type integer
    description Unique reference number for the adjustment
    maximum 8.0
    minimum 1.0

 

documentType
properties id type string
  description Unique identifier for the transaction type. These types are used for invoice and receipt entry by a Sales Ledger
  maxLength 2
  description type string
  string Actual name of the document type
  maxLength 25

 

payments array
items type object
  properties date type string
    required True
    description Represents the date on which the payment was made
    format date-time
    description type string
    description Short description outlining the nature of the payment
    maxLength 25
    grossAmount type number
    description Monetary amount of the payment including the tax
    maximum 1e+11
    minimum 0.0
    documentType type object
      description This is the document type
      properties For details, see the documentType properties table.
    documentNumber type integer
    description Unique reference number for the payment
    maximum 8.0
    minimum 1.0

 

invoices array
items type object
  properties invoiceId type integer
    description Unique number identifying a particular invoice
    minimum 8.0
    maximum 1.0
    accountId type integer
    description Represents the account to which invoice charges have been consolidated to
    minimum 8.0
    maximum 1.0
    invoiceTaxDate type string
    required True
    description Tax date that was used to generate an invoice
    format date-time
    invoiceType type string
    description Indicator to third parties to let them know the content of a particular invoice. An invoice can be for multiple subscriptions and it is useful to know if one of those subscriptions is receiving their first or final invoice. Values can be either FIRST , NORMAL or FINAL
    maxLength 6
    totalChargesThisPeriodExcludingTax type number
    description Represents the total charges this period prior to any tax being applied
    maximum 1e+11
    minimum 0.0
    taxAppliedThisPeriod type number
    description Represents the tax that will be applied this period
    maximum 1e+13
    minimum 0.0
    totalAmountDue type number
    description Represents the overall charge i.e. net plus tax
    maximum 1e+13
    minimum 0.0
    paymentAdvice type object
      description This is the Group Code
      properties For details, see the paymentAdvice properties table.
    accounts type array - see the accounts array for invoices table for details
    description This is Accounts
    subscriptions type array - see the subscriptions array table for details
      description This is Subscriptions

 

paymentAdvice
properties paymentDueDate type string  
  required True
  description Date respesenting when payment is dure for this invoice, calculated from payment terms
  format date-time
  giroReference type string
  description Giro reference, only applicable where subscription has opted for a manual payment option
  maxLength 40

 

 

accounts array for invoices
items type object
  properties accountId type integer
      description Unique identifier for an account
      maximum 8.0
      minimum 0.0
    accountType type object
      description Unique identifier for an account type code; it is associated with the account. Used to group related accounts together for credit management activities.
      properties For details, see the accountType properties table.
    accountName type string
      description Actual name associated with the account
      maxLength 40
    firstInvoiceDate type string
      required True
      description Date on which this account was first invoiced
      format date-time
    lastInvoiceDate type string
      required True
      description Last invoice date for an account
      format date-time
    invoiceFrequency type object
      description Indicated how often an invoice will be produced; this can be either 'Month' or 'Day'.
      properties For details, see the invoiceFrequency properties table.
    corporate type object
      description Unique identifier for a corporate, this represents the corporate structure that a subscription is associated with
      properties For details, see the corporate properties table.
    group type object
      description Unique identifier for a group, this represents the group structure that a subscription is associated with
      properties For details, see the group properties table.
    accountBillItems type array - see the accountBillItems array table for details
      description The primary network serial number that is associated with a subscription

 

invoiceFrequency
properties indicator type string
  description Indicates how often an invoice will be produced, this can be either 'Month' or 'Day'
  maxLength 5
  minLength 3
  value type integer
  description Indicates the cycle day when an invoice will be produced for a subscription
  maximum 3.0
  minimum 1.0

 

accountType
properties id type string
  description Unique identifier for an account type code, it is associated with account. Used to group related accounts together for credit management activities
  maxLength 3
  description type string
  description Actual name of the account type
  maxLength 30

 

accountBillItems array
items type object
  properties serviceID type string
    description The primary network serial number that is associated with a subscription
    maxLength 25
    billItemGroup type object
      description Unique identifier for a bill item group code. This is a container for bill item. It allows for related bill items to be grouped together logically for presentation on an invoice
      properties For details, see the billItemGroup properties table.
    billItem type object
      description Unique identifier for a bill item code. This represents an actual charge or credit for a particular subscription.
      properties For details, see the billItem properties table.
    chargeStartDate type string
    description Start date of the period that this charge or credit related to. Typically this date is populated but it can be empty for a per bill recurring charge.
    format date-time
    chargeEndDate type string
    description End date of the period that this charge or credit related to. Typically this date is populated but it can be empty for a per bill recurring charge.
    format date-time
    netAmount type number
    description Net amount of the actual charge (positive value) or credit (negative value)
    maximum 1e+11
    minimum 0.0
    taxAmount type number
    description Tax amount associated with bill item line. This can be positive or negative depending on whether you are dealing with a charge or a credit.
    maximum 1e+13
    minimum 0.0
    taxRate type number
    description Tax rate that was applied to this bill item line.
    maximum 99999.99
    minimum 0.0
    orderDetail type object
      description Reference number associated with a particular order
      properties For details, see the orderDetails properties table.

 

billItemGroup
properties id type string
  description Unique identifier for a bill item group code. This is a container for bill item. It allows for related bill items to be grouped together logically for presentation on an invoice.
  maxLength 6
  description type string
  description Actual name of the bill item group
  maxLength 30
  sequence type integer
  description Sequence associated with bill item group - can be used by third party print bureau to organise bill item group presentation on an invoice.

 

billItem
properties id type string
  description Unique identifier for a bill item code. This represents an actual charge or credit for a particular subscription.
  maxLength 6
  description type string
  description Actual name of the bill item.
  maxLength 30
  sequence type integer
  description Sequence associated with bill item - can be used by third party print bureau to organise bill item presentation with a bill item group on an invoice.
  maximum 7.0
  minimum 1.0

 

orderDetails
properties customerOrderReference type string
  description Reference number associated with a particular order
  maxLength  
  itemQuality type integer
  description Actual quantity ordered of a particular order
  maximum 4.0
  minimum 1.0

 

subscriptions array
items type object
  properties serviceID type string
    description Unique identifier for the subscription. Error if not supplied.
    maxLength 25
    minLength 1
    network type object
      description This is the Network.
      properties For details, see the network properties table.
    plan type object
      description This is the Plan
      properties For details, see the plan properties table.
    previousNetwork type object
      description This is the Previous Network
      properties For details, see the previousNetwork properties table.
    previousPlan type object
      description This is the Previous Plan
      properties For details, see the previousPlan properties table.
    planChangeDate type string
    description The date of the latest price plan change for a subscription
    format date-time
    billingStartDate type string
    required True
    description The date when a subscription was first connected to CMP
    format date-time
    billingEndDate type string
    description The date when a subscription was disconnected in CMP
    format date-time
    firstInvoiceDate type string
    required True
    description The date an invoice was first produced for a subscription
    format date-time
    lastInvoiceDate type string
    required True
    description The production date of the latest invoice for the subscription
    format date-time
    invoiceFrequency type object
      description This is the Invoice Frequency
      properties For details, see the invoiceFrequency properties table.
    userName type string
    description The name of a subscription
    maxLength 30
    minLength 1
    subscriptionInvoiceType type string
    description Identifier indicating if this is the first invoice, normal invoice or final invoice for a subscription. Contains either 'FIRST', 'NORMAL' or 'FINAL'
    maxLength 30
    minLength 1
    acccountId type integer
    description Account that is associated with a subscription
    maximum 8.0
    minimum 1.0
    corporate type object
      description This is the Corporate Code
      properties For details, see the corporate properties table.
    group type object
      description This is the Group Code
      properties For details, see the group properties table.
    subscriptionBillItems type array - see the subscriptionBillItems array table for details
    description Represents a list of bill items that a subscription will be charged for. Some of these can be zero priced or negative in the case of a discount.

 

network
properties id type string
  description Unique identifier for a network - represents the current network that a subscription is linked to.
  maxLength 6
  minLength 1
  description type string
  description Actual name of a network
  maxLength 30
  minLength 1

 

plan
properties id type string
  description Unique identifier for the price code plan; represents the current price plan a subscription is assigned to
  maxLength 6
  minLength 1
  description type string
  description Actual name of a price plan
  maxLength 30
  minLength 1

 

previousNetwork
properties id type  
  description Unique identifier for a network, represents the previous network a subscription was associated with prior to their current network
  maxLength 6
  minLength 1
  description type string
  description Actual name of a network
  maxLength 30

 

previousPlan
properties id type string
  description Unique identifier for a price plan code, represents the price plan a subscription was assigned to prior to their current one
  maxLength 6
  minLength 1
  description type string
  description Actual name of a price plan
  maxLength 30
  minLength 1

 

subscriptionBillItems array
items type object
  properties serviceId type string
    description The primary network serial number that is associated with a subscription
    maxLength 25
    billItemGroup type object
      description This is the Subscription Bill Items
      properties For details, see the billItemGroup properties table.
    billItem type object
      description This is the Bill Item
      properties For details, see the billItems properties table.
    chargeStartDate type string
    description Start date of the period that this charge or credit relates to . Typically this date is populated but it can be empty for a per bill recurring charge
    format date-time
    chargeEndDate type string
    description End date of the period that this charge or credit relates to Typically this date is populated but
    format date-time
    netAmount type number
    description Net amount of the actual charge (positive value) or credit (negative value)
    maximum 1e+11
    minimum 0.00
    taxAmount type number
    description Tax amount associated with bill item line, this can be positive or negative depending on whether you are dealing with a charge or a credit
    maximum 1e+13
    minimum 0.0
    taxRate type number
    description Tax rate that was applicable to this bill item
    maximum 99999.99
    minimum 0.0
    usageCount type integer
    description Count of usage that is stamped with this bill item and bill item group
    maximum 9.0
    minimum 1.0

 

detailedBills array
items type object
  properties invoiceId type string
    description Unique Identifier of the invoice. Error if not supplied.
    maxLength 8
    serviceIdentifiers type array
      description This is the Service Identifer
      items type object
        properties For details, see the serviceIdentifiers properties table.

 

serviceIdentifiers
properties

serviceId

type string
  description The primary network serial number that is associated with a subscription
  maxLength 25
  usageDetails type array - see the usageDetails array table for details
  description This is Usage Details
  usageAllowance type array - see the usageAllowances array table for details
  description Unique identifier , represents the real time basket that usage consumed from. In CMP, this represents a service with a service category of real time basket.

 

usageDetails
items type object
  properties usageDateTime type integer
    required True
    description Represents the date and time the usage was initiated
    format utc-millisec
    usageClassification type object
      description This is the Usage Classification
      properties For details, see the usageClassification properties table.
      type object
    billItem description This is the Bill Item
      properties For details, see the billItem properties table.
    destination type string
    description The number or destination IP address that the subscription sent the voice, text or data session to
    maxLength 18
    unitType type string
    description Indicates the nature of the usage This can be voice, text or data
    maxLength 30
    actualUsageUnits type integer
    description The actual duration of the usage session in seconds, kilobytes or quantity (text)
    maximum 1e+11
    minimum 0.0
    billableUsageUnits type integer
    description The billable duration of the usage session in seconds, kilobytes or quantity (text). This is to cater for situations where usage is rounded upwards e.g. an actual duration of 45 seconds might be rounded up to 1 minute for invoicing
    maximum 7.0
    minimum 1.0
    wholesaleUsageValue type number
    description The wholesale monetary cost of the usage
    maximum 1e+11
    minimum 0.0
    usageValue type number
    description The monetary cost of the usage. This can be zero if the usage has been paid for from an inclusive allowance
    maximum 1e+11
    minimum 0.0
    accessWholesaleCharge type number
    description The wholesale monetary cost of the access portion of the usage
    maximum 999999.99
    minimum 0.0
    accessRetailCharge type number
    description The retail monetary cost of the service potion of the usage
    maximum 999999.99
    minimum 0.0
    accessClassificationDescription type string
    description This is the Access Classification Description
    maxLength 30
    accessActualUnits type integer
    description The actual duration of the access portion of the usage
    maximum 6.0
    minimum 1.0
    accessBillableUnits type integer
    description The billable duration of the access portion of the usage
    maximum 6.0
    minimum 1.0
    serviceWholesaleCharge type number
    description The wholesale monetary cost of the service portion of the usage
    maximum 999999.99
    minimum 0.0
    serviceRetailCharge type number
    description The wholesale monetary cost of the service portion of the usage
    maximum 999999.99
    minimum 0.0
    serviceClassificationDescription type number
    description This is the Service Classification Description
    maxLength 6
    serviceActualUnits type integer
    description The actual duration of the service portion of the usage
    maximum 6.0
    minimum 1.0
    serviceBillableUnits type integer
    description The billable duration of the service portion of the usage
    maximum 6.0
    minimum

1.0

    discountValue type number
    description Applicable for post paid rating solution only. Stores a discount that has been applied to the usage
    maximum 999999.99
    minimum 0.0
    perBundleValue type number
    description Applicable for post paid rating solution only where usage bundling is configured
    maximum 999999.99
    minimum 0.0
    bundleValue type number
    description Applicable for post paid raring solution only where usage bundling is configured
    maximum 999999.99
    minimum 0.0

 

usageClassification
properties   id type string
description This represents the call class code that allows similar usage to be grouped together for invoicing and bill purposes
maxLength 12
description type string
description Actual description of the call class code
maxLength 30

 

usageAllowances array
items type object
  properties allowance type object
      description This is the Allowance
      properties For details, see the allowance properties table.
    allowanceConsumption type number
    description Total of all the consumption from a subscriptions particular allowance in the period being invoiced. This value can either be money, seconds, kilobytes or quantity (texts) depending on type of allowance
    maximum 1e+7
    minimum 0.0
    allowanceValue type number
    description Total allowance value that is available to a subscription at the start of an invoice period. This value can either be money, seconds, kilobytes or quantity (texts) depending on type of allowance
    maximum 999999.99
    minimum 0.0
    allowanceType type string
    description Indicates type of allowance you are dealing with. Possible values are money, seconds, kilobytes or quantity.
    maxLength 6
    isShared type string
    description Indicates if the allowance can be shared across multiple subscriptions in the same structure
    maxLength 1
    isRollover type string
    description Indicates if the allowance rolls over automatically on a subscriptions bill cycle
    maxLength 1
    minLength 1
    isRecurring type string
    description Indicates if the allowance is a one off or recurring
    maxLength 1
    minLength 1
    isUnlimited type string
    description Indicates if the allowance has no upper consumption limit
    maxLength 1
    minLength 1
    acquisitionMethod type string
    description Indicates the acquisition method of the allowance. It could be part of a subscriptions inclusive allowance or added via a bolt on
    maxLength 6
    region type string
    description Indicates if the allowance is restricted for use in a certain geographic region only
    maxLength 10
    moneyType type string
    description Indicates if allowance is real money or reward money
    maxLength 10

 

allowance
properties id type string
  description Unique identifier , represents the real time basket that usage consumed from. In CMP, this represents a service with a service category of real time basket.
  maxLength 6
  description type string
  description Actual name of the allowance, i.e. service description
  maxLength 30